package cc.ilzy.mall.api.controller;

import cc.ilzy.mall.model.vo.CouponVO;
import cc.ilzy.mall.utils.ApiResponse;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@Api(value = "优惠券接口", tags = "优惠券接口")
@RequestMapping("/api/coupon/v1")
public interface ICouponController {


    @ApiOperation(value = "查询优惠券记录分页", notes = "查询优惠券记录分页")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, defaultValue = "1", dataType = "Integer"),
            @ApiImplicitParam(name = "pageSize", value = "每页数量", required = false, defaultValue = "10", dataType = "Integer"),
            @ApiImplicitParam(name = "couponId", value = "优惠券ID", required = false, dataType = "Long"),
            @ApiImplicitParam(name = "category", value = "优惠券分类", required = false, dataType = "String")
    })
    @GetMapping("/page")
    ApiResponse<IPage<CouponVO>> queryPage(
            @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
            @RequestParam(value = "couponId", required = false) Long couponId,
            @RequestParam(value = "category", required = false) String category
    );
}
